<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>我的收入</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
<link href="{$Think.config.RESOURCEURL}wx_assets/quan/balance.css{$Think.config.RESOURCE_VER}" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
<script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
</head>
<body>
<div class="main">
   <div class="container">
        <div class="content" id="container">
            
        </div>
    </div>
</div>
<script type="text/html" id="tpl">
	<div class="income">
        <div class="incomeMain" onclick="balance.go('{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=quan&method=getBalanceList&params=%7B%22qId%22%3A%22{$qId}%22%2C%22uType%22%3A%22{$uType}%22%2C%22tType%22%3A%221%22%7D')">
        	<table cellpadding="0" cellspacing="0" border="1">
        		<tr>
        			<th>累计收入（元）</th>
        			<th>本月收入（元）</th>
        			<th>账单</th>
        		</tr>
        		<tr>
        			<td><%=inM%></td>
        			<td><%=inMM%></td>
        			<td valign="middle">
        				<a class="orderBtn"></a>
        			</td>
        		</tr>
        	</table>
        </div>
        <div class="whiteFoot">
        </div>
    </div>
    <div class="income">
        <div class="incomeMain payMain" onclick="balance.go('{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=quan&method=getBalanceList&params=%7B%22qId%22%3A%22{$qId}%22%2C%22uType%22%3A%22{$uType}%22%2C%22tType%22%3A%222%22%7D')">
            <table cellpadding="0" cellspacing="0" border="1">
        		<tr>
        			<th>累计支出（元）</th>
        			<th>本月支出（元）</th>
        			<th>账单</th>
        		</tr>
        		<tr>
        			<td><%=outM%></td>
        			<td><%=outMM%></td>
        			<td valign="middle">
        				<a class="orderBtn"></a>
        			</td>
        		</tr>
        	</table>
        </div>
        <div class="whiteFoot">
        </div>
    </div>
    <div class="income">
        <div class="incomeMain mentionNowMain" onclick="balance.go('{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=quan&method=getBalanceList&params=%7B%22qId%22%3A%22{$qId}%22%2C%22uType%22%3A%22{$uType}%22%2C%22tType%22%3A%223%22%7D')">
            <table cellpadding="0" cellspacing="0" border="1">
        		<tr>
        			<th>累计提现（元）</th>
        			<th>本月提现（元）</th>
        			<th>账单</th>
        		</tr>
        		<tr>
        			<td><%=outT%></td>
        			<td><%=outMT%></td>
        			<td valign="middle">
        				<a class="orderBtn"></a>
        			</td>
        		</tr>
        	</table>
        </div>
        <div class="whiteFoot">
            <div class="mentionNow" onclick="balance.go('{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=quan&method=cashPage&params=%7B%22qId%22%3A%22{$qId}%22%2C%22uType%22%3A%22{$uType}%22%2C%22tType%22%3A%223%22%7D')"><a>提现</a></div>
        </div>
    </div>
</script>
<script type="text/javascript">
    var baseUrl = '{$Think.config.SERVER_HOST}';
    var balance={
        init:function(){
            var me=this;
            $.util.pageLoading.show();
            me._loadList(function(){
                $.util.pageLoading.hide();
            });
        },
        go:function(url){
            location.href=url;
        },
        _renderList:function(data,callback){
            var me=this;
           if(data){
                var html=template("tpl", data),
                    container=$("#container");
                container.html(html);
                callback && callback();
           }   
        },
        _loadList:function(callback){
            var me=this;
            $.req.get("call.json?module=quan&customerId={$customerId}&method=getBalanceSum",{
                userName:"{$userName}",
                params:{
                    "qId":"{$qId}",
                    "uType":"{$uType}"
                }
            },function(data){
                if(data){
                    me._renderList(data,callback);
                }
            });
        }
    }
    balance.init();
    wx_share.init({
        "pkg":{
            "appId": '{$pkg.appId}',
            "timestamp": {$pkg.timestamp},
            "nonceStr": '{$pkg.nonceStr}',
            "signature": '{$pkg.signature}'
        },
        hide:1
    });
</script>
</body>
</html>